CREATE TABLE [dbo].[Uspev]
(
[Ik_ved] [int] NOT NULL,
[Ik_zach] [int] NOT NULL,
[Cosenca] [int] NULL,
[PropCount] [int] NULL,
[UserName] [varchar] (50) COLLATE Cyrillic_General_CI_AS NULL CONSTRAINT [DF_Uspev_UserName] DEFAULT (suser_sname()),
[i_balls] [int] NULL,
[Uvag_PropCount] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Uspev] ADD CONSTRAINT [PK_Uspev] PRIMARY KEY CLUSTERED  ([Ik_ved], [Ik_zach]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Uspev] ADD CONSTRAINT [FK_Uspev_Osenca] FOREIGN KEY ([Cosenca]) REFERENCES [dbo].[Osenca] ([Cosenca])
GO
ALTER TABLE [dbo].[Uspev] WITH NOCHECK ADD CONSTRAINT [FK_Uspev_Vedomost] FOREIGN KEY ([Ik_ved]) REFERENCES [dbo].[Vedomost] ([Ik_ved])
GO
ALTER TABLE [dbo].[Uspev] ADD CONSTRAINT [FK_Uspev_Zach] FOREIGN KEY ([Ik_zach]) REFERENCES [dbo].[Zach] ([Ik_zach])
GO
